package top.tungsword.webconsole.biz.response;

import java.io.Serializable;

/**
 * @author chenji.yu
 * @date 2020/4/21 14:30
 * @description
 */
public class WebReturnInfo<T> implements Serializable {

    public static final int SUCCESS_CODE = 200;
    public static final int FAIL_CODE = 500;

    private Integer code;
    private String message;
    private T content;

    private static final long serialVersionUID = 7796809436161820701L;

    public static WebReturnInfo SUCCESS = new WebReturnInfo(SUCCESS_CODE);
    public static WebReturnInfo FAIL = new WebReturnInfo(FAIL_CODE);

    private WebReturnInfo(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }
}
